package com.peter.ai;

import java.io.File;

import com.peter.ai.util.MyThread;
import com.peter.ai.voice.BaiduClientIntance;

/**
 * Hello world!
 *
 */
public class AppTaichu {
	public static void main(String[] args) {
		final String txtDir = "E://text2voice/taichu/txt/";
		final String mp3Dir = "E://text2voice/taichu/mp3/";
		BaiduClientIntance instance = new BaiduClientIntance();
		// FileUtils.splitFile("E://text2voice/taichu/太初.txt", "------", txtDir);
		File dir = new File(txtDir);
		File[] files = dir.listFiles();
		int threadSize = files.length / 20;
		
		for (int i = 0; i < threadSize; i++) {
			Thread thread = new MyThread(i,files,instance,mp3Dir);
			thread.start();
		}

		// instance.text2Voice("2第三章 规矩.txt", FileUtils.readFile(txtDir+"2第三章 规矩.txt"),
		// mp3Dir);

	}
}
